﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            MessageBox.Show("你好窗体！");
        }

        private void Form1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            BackColor = Color.Blue;
        }

        private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            BackColor = Color.Red;
        }
//登录
        private void button1_Click(object sender, EventArgs e)
        {
            string uid = textBox1.Text;
            string password = textBox2.Text;

            string Username = "云云不见了";
            string Password = "ab123";

            if (Username==uid && Password==password)
            {
                MessageBox.Show("登录成功！"); 
            }
            else
            {
                MessageBox.Show("登录失败！");
            }

        }
    }
}
